
<section id="mybody">
<div class="container">
<div class="row">



<header id="myheader">
<p><?php echo isset($name)?$name:'';?>您好!欢迎加入西部挖掘机经纪人联盟</p>
</header>

<section id="hide_form" class="_hide">
<form id="form1" name="form1" action="<?=base_url().'index.php/main_control/entrance_do'?>" method="post">
<input type="text"  name="openId" id="openId" placeholder="openId"  value="<?php echo isset($openId)?$openId:'';?>">
<input type="text"  name="name" id="name" placeholder="name" value="<?php echo isset($name)?$name:'';?>">
<input id="uid"  name="uid" placeholder="uid" type="text" class="form-control"  value="<?php echo isset($uid)?$uid:0;?>" >
<input id="state"  name="state" placeholder="state" type="text" class="form-control"  value="<?php echo isset($state)?$state:-1;?>" >
<input id="flag"  name="flag" placeholder="flag" type="text" class="form-control"  value="<?php echo isset($flag)?$flag:-1;?>" >

</form>
</section>

<!--  
<section id="mylogo">
<img alt="140x140" class="img-circle img-responsive center-block" data-src="holder.js/140x140" style="width: 140px; height: 140px;" src="" data-holder-rendered="true">
</section>
-->

<?php if ($state==-1): ?>
<section id="mybody_2">
<div class="jumbotron">
<p><h3>赶紧注册经纪人吧 !</h3></p>
<p><h3>丰厚佣金等着您哟 : )</h3></p>
<p><a class="btn btn-warning btn-lg" href="#" role="button" onClick="tijiao(1)" >我要注册</a></p>
</div>
</section>
<?php endif; ?>

<?php if ($state==1): ?>
<section id="mybody_1">
<div class="jumbotron">
<p><h3>赶紧推荐客户吧 !</h3></p>
<p><h3>丰厚佣金等着您哟 : )</h3></p>
<p><a class="btn btn-warning btn-lg" href="#" role="button" onClick="tijiao(2)" >我要推荐</a></p>
</div>
</section>
<?php endif; ?>



<?php if ($state==0): ?>
<section id="mybody_3">
<div class="jumbotron">
<p><h3>感谢您加入组织</h3></p>
<p><h3>正在加紧审核中...</h3></p>
<p><a class="btn btn-primary btn-lg" href="#" role="button" onclick="WeixinJSBridge.call('closeWindow');" >关闭</a></p>
</div>
</section>
<?php endif; ?>

<?php if ($state==2): ?>
<section id="mybody_3">
<div class="jumbotron">
<p><h3>您的账号已经暂停</h3></p>
<p><a class="btn btn-primary btn-lg" href="#" role="button" onclick="WeixinJSBridge.call('closeWindow');" >关闭</a></p>
</div>
</section>
<?php endif; ?>

<?php if ($state==1): ?>
<section id="footer">
<div id="_buttom_menu" class="navbar-fixed-bottom">
<div class="col-xs-3"><button type="button" class="btn btn-default" onClick="tijiao(3)">回到首页</button></div>
<div class="col-xs-3"><button type="button" class="btn btn-default" onClick="tijiao(2)">推荐客户</button></div>
<div class="col-xs-3">
<div class="btn-group dropup">
<button type="button" class="btn btn-default dropdown-toggle" 
data-toggle="dropdown">
个人中心<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#" onClick="tijiao(4)">我的信息</a></li>
<li><a href="#" onClick="tijiao(5)">我的客户</a></li>
</ul>
</div>    
</div>
<div class="col-xs-3"><button type="button" class="btn btn-default">。。。</button></div>
</div>
</section>
<?php endif; ?>


</section>

<script type="text/javascript">
$(window).load(function() {
	var session_openId=sessionStorage.getItem("openId");
	if (session_openId == null || session_openId == undefined || session_openId == '') { 
		sessionStorage.setItem("openId", "<?=isset($openId)?$openId:'';?>"); 
// 		alert("save openId:"+session_openId);
	} 	

	var session_uid=sessionStorage.getItem("uid");
	if (session_uid == null || session_uid == undefined || session_uid == 0) { 
		sessionStorage.setItem("uid", "<?=isset($uid)?$uid:0;?>"); 
// 		alert("save openId:"+session_openId);
	} 

	var session_state=sessionStorage.getItem("state");
	if (session_state == null || session_state == undefined || session_state == '') { 
		sessionStorage.setItem("state", "<?=isset($state)?$state:'';?>"); 
	} 
}); 




function tijiao(flag){
	$('#flag').val(flag);
// 	alert('flag='+$('#flag').val());
// 	if(flag>0)
    document.form1.submit();
}

</script> 


